<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>10-筛选方法</title>
		<script type="text/javascript" src="js/jquery2.1.4.min.js"></script>
	</head>
	<body>
		<ul>
			<li>百度</li>
			<li>百度</li>
			<li class="baidu">百度</li>
			<div><li>新浪1</li></div>
			<div><li>新浪2</li></div>
		</ul>
		<p class="cur">这是一面旗帜</p>
		<script type="text/javascript">
			var ul = $("li").parent();
			console.log(ul);//Object { 0: ul, length: 1, prevObject: {…}, context: HTMLDocument 
			var lis = $('ul').children();
			//Object { 0: li, 1: li, 2: li, length: 3, prevObject: {…}, context: HTMLDocument
			console.log(lis);
			//find查找否和条件的所有jquery元素对象
			var oli = $('ul').find('li');
			//Object { 0: li, 1: li, 2: li, 3: li, length: 4, prevObject: {…}, context: HTMLDocument
			console.log(oli);
			//查找兄弟节点,如果siblings()不传值，就是查找除了它自己以外的所有兄弟
			var others = $('.baidu').siblings();
			console.log(others)
			//如果siblings()传值，就是查找除了它自己以外的关于传递值相关的兄弟
			var others = $('.baidu').siblings('li');
			console.log(others)
			
			var nextAll = $('.baidu').nextAll();
			console.log(nextAll);
			
			
			var flag = $('p').hasClass('cur');
			console.log("是否有::"+flag);//true
			
			//获取ul里面的第2个li
			var second = $('ul li').eq(1);//它是jquery对象非DOM
			$('ul li').eq(1).css({'color':'blue'});
			console.log(second);
		</script>
	</body>
</html>
